/**
 * Created by Administrator on 2015/10/9.
 */
var app = angular.module('app.config', ['ionic']);

app.config(['$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider) {
  //$stateProvider
  //  .state('welcome', {
  //    url: '/welcome',
  //    templateUrl: 'templates/welcome.html'
  //  });
  $urlRouterProvider.otherwise('/welcome');
}]);

app.constant('DB_CONFIG', {
  name: 'database.db',
  tables: [
    {
      name: 'users',
      columns: [
        {name: 'id', type: 'integer primary key'},
        {name: 'username', type: 'text'},
        {name: 'password', type: 'text'},
        {name: 'status', type: 'text'},
        {name: 'dr', type: 'integer default 0'}
      ]
    },
    {
      name: 'logs',
      columns: [
        {name: 'id', type: 'integer primary key AUTOINCREMENT'},
        {name: 'num', type: 'text'},
        {name: 'desc', type: 'text'},
        {name: 'createtime', type: 'text'},
        {name: 'dr', type: 'integer default 0'}
      ]
    }
  ]
});
app.constant('WEB_SERVICE', {
  url: 'http://example8000.tunnel.mobi/MvnServiceExample/ws/rest/service/',
  method: {
    select:'select',
    insert:'insert'
  }
});
